-- GENERATED SPELL FOR [Lightsworn Elekk Rider] --


function spell0_22966(pUnit, Event) --@Summon Lightsworn Elekk,n/a--
pUnit:FullCastSpellOnTarget(39782,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22966', 564, 1)
end

function Sorts_22966(pUnit, Event)
local choix_sorts_22966 = math.random(0, 0)
if choix_sorts_22966 == 0 then
pUnit:RegisterEvent('spell0_22966', 1, 1)
end
end

function mob22966_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_22966', math.random(1500, 3000), 1)
end

function mob22966_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22966_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22966_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(22966, 1, 'mob22966_Action')
RegisterUnitEvent(22966, 2, 'mob22966_Leave')
RegisterUnitEvent(22966, 3, 'mob22966_Kill')
RegisterUnitEvent(22966, 4, 'mob22966_Die')
